<?php

class UserPage {

	private $userId;
	private $pageTitle;
	private $pageSubtitle;
	private $about;
	private $viewType;
	private $cssUrl;
	private $customHeader;
	
	public function setUserId ($v) {
		$this->userId=$v;
	}
	
	public function getUserId () {
		return $this->userId;
	}
	
	public function setPageTitle ($v) {
		$this->pageTitle=$v;
	}
	
	public function getPageTitle () {
		return $this->pageTitle;
	}
	
	public function setSubtitle ($v) {
		$this->pageSubtitle=$v;
	}
	
	public function getPageSubtitle () {
		return $this->pageSubtitle;
	}
	
	public function setAbout ($v) {
		$this->about=$v;
	}
	
	public function getAbout () {
		return $this->about;
	}
	
	public function setViewType ($v) {
		$this->viewType=$v;
	}
	
	public function getViewType() {
		return $this->viewType;
	}
	
	public function setCssUrl($v) {
		$this->cssUrl=$v;
	}
	
	public function getCssUrl() {
		return $this->cssUrl;
	}
	
	public function setCustomHeader ($v) {
		$this->customHeader=$v;
	}
	
	public function getCustomHeader () {
		return $this->customHeader;
	}
	
	public function getString () {
		return $this->getUserId().' '.$this->getAbout().' '.$this->getCustomHeader().' '.$this->getPageSubtitle().' '.
		$this->getPageTitle().'<br />';
	}
	
	public static function getUserPageByUserIdStatement() {
		return "SELECT * FROM user_page WHERE user_id=?";
	}
	
	public static function getAddDefaultUserPageStatement() {
		return "INSERT INTO user_page(user_id, page_title,page_subtitle,about) values(?,?,?,?)";
	}
	
	public static function getUpdatePageStatement() {
		return "UPDATE user_page 
				SET page_title=?, page_subtitle=?, about=?, view_type=?, css_url=?, custom_header=?
				WHERE user_id=?";					
	}
	
}

?> 
